// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'


import { Field, CellGroup, Button, Uploader, Popup, Checkbox, Notify, Icon, Col, Row, Picker, DatetimePicker, Toast, Tab, Tabs, Loading,Rate,Dialog   } from 'vant';
import axios from '../node_modules/axios'

import token from './assets/js/token'
import Common from './lib/common.js'
import Xhr from './lib/xhr'

import { NavBar } from 'vant';
import { CountDown } from 'vant';

Vue.use(CountDown);
Vue.use(NavBar);

Vue.prototype.common = Common;
Vue.prototype.xhr = Xhr;
Vue.prototype.token = token
import { PopupPicker, XButton, Selector } from 'vux'

// import Cube from 'cube-ui'
// Vue.use(Cube)


Vue.component('popup-picker', PopupPicker)
Vue.component('x-button', XButton)
Vue.component('selector', Selector)

import ElementUI from 'element-ui';
//import 'element-ui/lib/theme-chalk/index.css';

// Vue.use(ElementUI);


//axios.defaults.baseURL='http://111.1.29.66:12000/v1/'
//axios.defaults.baseURL='https://pets-api.jx-ding.com/v1/'
//axios.defaults.baseURL='http://192.168.16.189:18000/v1/'
axios.defaults.headers['Content-Type'] = 'application/x-www-form-urlencoded'
Vue.prototype.$axios = axios;

Vue.use(Field).use(CellGroup).use(Button).use(Uploader).use(Popup).use(Checkbox).use(Icon).use(Col).use(Row)
    .use(Picker).use(DatetimePicker).use(Toast).use(Tab).use(Tabs).use(Loading).use(Notify).use(Rate).use(Dialog);

Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
    el: '#app',
    router,
    axios,
    components: { App },
    template: '<App/>'
})